package thinking.函数高级

object 科里化 {
  def main(args: Array[String]): Unit = {

    def eq(s1: String, s2: String) = {
      s1.equals(s2)
    }

    implicit class TestEq(s: String) {
      def CheckEq(ss: String, f: (String, String) => Boolean): Boolean = {
        f(s.toLowerCase, ss.toLowerCase)
      }
    }
    val str: String = "hello"

    val bool = str.CheckEq("HELLO", eq)
    print(bool)

  }


}
